/*   1:    */ package com.atomikos.icatch.imp;
/*   2:    */ 
/*   3:    */ import com.atomikos.icatch.CompositeCoordinator;
/*   4:    */ import com.atomikos.icatch.CompositeTransaction;
/*   5:    */ import com.atomikos.icatch.HeuristicMessage;
/*   6:    */ import com.atomikos.icatch.RecoveryCoordinator;
/*   7:    */ import com.atomikos.icatch.SysException;
/*   8:    */ import java.util.Properties;
/*   9:    */ import java.util.Stack;
/*  10:    */ 
/*  11:    */ public class CompositeTransactionAdaptor
/*  12:    */   extends AbstractCompositeTransaction
/*  13:    */   implements CompositeCoordinator
/*  14:    */ {
/*  15:    */   private static final long serialVersionUID = 6361601412982044104L;
/*  16:    */   private RecoveryCoordinator adaptor_;
/*  17:    */   private String root_;
/*  18:    */   private Boolean isRecoverableWhileActive_;
/*  19:    */   
/*  20:    */   public CompositeTransactionAdaptor(Stack lineage, String tid, boolean serial, RecoveryCoordinator adaptor, Boolean isRecoverableWhileActive)
/*  21:    */   {
/*  22: 79 */     super(tid, (Stack)lineage.clone(), serial);
/*  23: 80 */     this.adaptor_ = adaptor;
/*  24: 81 */     Stack tmp = (Stack)lineage.clone();
/*  25: 82 */     CompositeTransaction parent = null;
/*  26: 83 */     while (!tmp.empty()) {
/*  27: 84 */       parent = (CompositeTransaction)tmp.pop();
/*  28:    */     }
/*  29: 86 */     this.root_ = parent.getTid();
/*  30: 87 */     this.isRecoverableWhileActive_ = isRecoverableWhileActive;
/*  31:    */   }
/*  32:    */   
/*  33:    */   public CompositeTransactionAdaptor(String root, boolean serial, RecoveryCoordinator adaptor)
/*  34:    */   {
/*  35:100 */     this(root, serial, adaptor, null);
/*  36:    */   }
/*  37:    */   
/*  38:    */   public CompositeTransactionAdaptor(String root, boolean serial, RecoveryCoordinator adaptor, Properties properties)
/*  39:    */   {
/*  40:118 */     super(root, null, serial);
/*  41:119 */     this.adaptor_ = adaptor;
/*  42:120 */     this.root_ = root;
/*  43:121 */     if (properties != null) {
/*  44:121 */       this.properties_ = ((Properties)properties.clone());
/*  45:    */     }
/*  46:    */   }
/*  47:    */   
/*  48:    */   public CompositeCoordinator getCompositeCoordinator()
/*  49:    */     throws SysException
/*  50:    */   {
/*  51:130 */     return this;
/*  52:    */   }
/*  53:    */   
/*  54:    */   public String getCoordinatorId()
/*  55:    */   {
/*  56:139 */     return this.root_;
/*  57:    */   }
/*  58:    */   
/*  59:    */   public HeuristicMessage[] getTags()
/*  60:    */   {
/*  61:148 */     return null;
/*  62:    */   }
/*  63:    */   
/*  64:    */   public RecoveryCoordinator getRecoveryCoordinator()
/*  65:    */   {
/*  66:157 */     return this.adaptor_;
/*  67:    */   }
/*  68:    */   
/*  69:    */   public Boolean isRecoverableWhileActive()
/*  70:    */   {
/*  71:162 */     return this.isRecoverableWhileActive_;
/*  72:    */   }
/*  73:    */   
/*  74:    */   public void setRecoverableWhileActive()
/*  75:    */   {
/*  76:167 */     throw new UnsupportedOperationException();
/*  77:    */   }
/*  78:    */ }


/* Location:           C:\myfile\mysoft\apache-maven-3.5.0-bin\apache-maven-3.5.0\myrep\com\atomikos\transactions\3.7.0\transactions-3.7.0.jar
 * Qualified Name:     com.atomikos.icatch.imp.CompositeTransactionAdaptor
 * JD-Core Version:    0.7.0.1
 */